<template>
  <div id="app">
    <el-container>
      <el-aside width="250px">
        <div style="height: 60px;line-height: 60px;text-align: center">
          <p style="color:black;font-size: larger">调拨记录</p>
        </div>
        <div>
          <el-button class="back-button" type="text" @click="goBack">
            <i class="el-icon-arrow-left"></i> 返回
          </el-button>
        </div>
        <el-dialog title="调拨信息" :visible.sync="dialogFormVisible">
          <el-form :model="form">
            <el-form-item label="目标仓库" :label-width="formLabelWidth">
              <el-input v-model="form.name" autocomplete="off"></el-input>
            </el-form-item>
            <el-form-item label="原仓库" :label-width="formLabelWidth">
              <el-input v-model="form.name" autocomplete="off"></el-input>
            </el-form-item>
            <el-form-item label="餐具编号" :label-width="formLabelWidth">
              <el-input v-model="form.name" autocomplete="off"></el-input>
            </el-form-item>
            <el-form-item label="调拨日期" :label-width="formLabelWidth">
              <el-input v-model="form.name" autocomplete="off"></el-input>
            </el-form-item>
            <el-form-item label="调拨数量" :label-width="formLabelWidth">
              <el-input v-model="form.name" autocomplete="off"></el-input>
            </el-form-item>
          </el-form>
          <div slot="footer" class="dialog-footer">
            <el-button @click="dialogFormVisible = false">取 消</el-button>
            <el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>
          </div>
        </el-dialog>


      </el-aside>
      <el-main>
        <!-- 表格展示数据 -->
        <el-table :data="tableData" border stripe header-cell-class-name="headerBg">
          <el-table-column prop="AllocateID" label="调拨记录ID"width="120"></el-table-column>
          <el-table-column prop="TargetWH" label="目标仓库" width="140"></el-table-column>
          <el-table-column prop="OriWH" label="原仓库" width="120"></el-table-column>
          <el-table-column prop="TWid" label="餐具编号"width="120"></el-table-column>
          <el-table-column prop="Num" label="数量"width="120"></el-table-column>
          <el-table-column prop="Date" label="调拨日期"width="120"></el-table-column>

          <el-table-column label="操作">
            <template slot-scope="scope">
              <el-button type="success">编辑<i class="el-icon-edit"></i></el-button>
              <el-button type="danger">删除<i class="el-icon-remove-outline"></i></el-button>
            </template>
          </el-table-column>
        </el-table>
        <div style=" padding: 10px 0">
          <el-input style="width: 200px;margin-top:10px" placeholder="请输入调拨记录ID" suffix-icon="el-icon-search"></el-input>
          <el-input style="width: 200px;margin-top:10px" placeholder="请输入餐具编号" suffix-icon="el-icon-message" class="ml-5"></el-input>
          <el-button type="primary" style="margin-top: 10px">搜索</el-button>
          <el-button type="success" @click="dialogFormVisible = true">添加</el-button>
        </div>
      </el-main>
    </el-container>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        targetRepo: '',
        sourceRepo: '',
        utensilCode: '',
        transferDate: '',
        transferQuantity: '',
        allocationId: '',
        tableData: [
          {
            AllocateID: '1',
            TargetWH: '张三',
            OriWH: '北京市',
            TWid: '北京市',
            Num:"10",
            Date: '北京市',
          },
          {
            AllocateID: '2',
            TargetWH: '张三',
            OriWH: '北京市',
            TWid: '北京市',
            Num:"10",
            Date: '北京市',
          },
          {
            AllocateID: '3',
            TargetWH: '张三',
            OriWH: '北京市',
            TWid: '北京市',
            Num:"10",
            Date: '北京市',
          },
          {
            AllocateID: '4',
            TargetWH: '张三',
            OriWH: '北京市',
            TWid: '北京市',
            Num:"10",
            Date: '北京市',
          }
        ],
        form: {
          name: '',
          region: '',
          date1: '',
          date2: '',
          delivery: false,
          type: [],
          resource: '',
          desc: ''
        },
        dialogFormVisible: false,
        formLabelWidth: '200px',
      };
    },
    methods: {
      goBack() {
        // 执行退出登录的逻辑
        // 返回登录页
        this.$router.push('/Index');
      },
    }
}
</script>

<style>
  .el-container:nth-child(7) .el-aside {
    line-height: 440px;
  }
</style>
